﻿#include <stdio.h>
int main()
{
    int denominator, flag, i, N;
    double item, sum;

    scanf_s("%d", &N);

    flag = 1;
    denominator = 1;
    sum = 0;

    for (i = 1; i <= N; i++) { 
        item = flag * 1.0 / denominator;
        sum = sum + item;
        flag = -flag;
        denominator = denominator + 3;
    }
    printf("sum=.3%f\n", sum);

    return 0;
}